/*
 * Main.java
 *  java program model for www.programming-challenges.com
 */

import java.io.*;

public class Main implements Runnable{
	/* utility function to read from stdin,
	   Provided by Programming-challenges, edit for style only */
	static String ReadLn(int maxLength){  
		byte line[] = new byte [maxLength];
		int length = 0;
		int input = -1;
		try{
			/* Read until maxLength or until end of line input */
			while (length < maxLength){
				input = System.in.read();
				if ((input < 0) || (input == '\n')) break; 
				line [length++] += input;
			}

			if ((input < 0) && (length == 0)) return null;  // eof
			return new String(line, 0, length);
		}catch (IOException e){
			return null;
		}
	}
	
	/* utility function to get clean String by mcjung */
	static final private String REGEX_WHITESPACE = "\\s+";	
	static String getCleanLine(String dirtyLine) {
		return dirtyLine.trim().replaceAll(REGEX_WHITESPACE, " ");
	}

	public static void main(String args[])  // entry point from OS
	{
		Main myWork = new Main();  // Construct the bootloader
		myWork.run();            // execute
	}

	public void run() {
		new myStuff().run();
	}
}

class myStuff implements Runnable{
	static final private int readLength = 255;	

	public void run(){
		// Your program here
		while(true) {
			String input = Main.ReadLn(readLength);			
			if(input == null) break;

			String cleanLine = Main.getCleanLine(input);			

			String parted[] = cleanLine.split(" ");			
			if(parted.length != 2) continue;

			ThreeNCalculator cal = new ThreeNCalculator(Long.parseLong(parted[0])
					, Long.parseLong(parted[1]));
			
			System.out.println(cleanLine + " " + cal.getMaxCycleLength() );
		}

	}

	// You can insert more classes here if you want.

	public static class ThreeNCalculator {

		private long mStartNum;
		private long mEndNum;
		private long mMaxCycleLength;

		public ThreeNCalculator(long startNum, long endNum) {
			setNumbers(startNum, endNum);
			this.mMaxCycleLength = calculateMaxCycleLength();
		}

		private void setNumbers(long startNum, long endNum) {
			if(startNum < endNum) {
				this.mStartNum = startNum;
				this.mEndNum = endNum;	
			} else {
				this.mEndNum = startNum;
				this.mStartNum = endNum;
			}
		}	

		public long calculateCycleLength(long number) {
			long count = 1;
			while(number != 1) {
				if(number % 2 == 0) {
					number = number >> 1;				
				} else {
					number = (3 * number) + 1;				
				}
				++count;
			}
			return count;
		}

		private long calculateMaxCycleLength() { 
			long result, maxCycleLength = -1;		

			for(long i = mStartNum; i <= mEndNum; ++i) {
				result = calculateCycleLength(i);			
				if(result > maxCycleLength)
					maxCycleLength = result;
			}
			return maxCycleLength; 
		}

		public long getEndNum() {
			return mEndNum;
		}

		public long getStartNum() {
			return mStartNum;
		}	

		public long getMaxCycleLength() {		
			return mMaxCycleLength;
		}
	}
}